//Random generator
//$Id: random.h 612 2010-11-28 18:40:53Z Oleg.Bulychov $
#pragma once

class random_generator
{
    int tid_;
public:
    explicit random_generator(int thread_id): tid_(thread_id)
    {}

    int get_Thread_Id() const
    {
        return tid_;
    }

    void set_Thread_Id(int thread_id)
    {
        tid_ = thread_id;
    }

    unsigned next_UInt(unsigned uRange);//:[0..uRange)

    size_t next_SizeT(size_t uRange);//:[0..uRange)

    double next_Double();//:[0..1)

#if defined(USE_STOC1)
    double next_Normal(double m, double s);
#endif

    static void randomize(int nMaxThreads, unsigned uSeed, int nRank);
};

//EOF!
